/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 07 - 04
 * Time: 16:29
 */
class Solution2 {
    public boolean judge (String str) {
        int right = str.length() - 1;
        int left = 0;
        while(left <= right) {
            if(str.charAt(left) == str.charAt(right)) {
                left++;
                right--;
            }else {
                return false;
            }
        }
        return true;
    }
}
    class Test {

    }
